package com.ming.sportdemo.service.serviceImpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ming.sportdemo.bean.Clothes;
import com.ming.sportdemo.dao.ClothesDao;
import com.ming.sportdemo.service.ClothesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClothesServiceImpl extends ServiceImpl<ClothesDao, Clothes> implements ClothesService {
    @Autowired
    ClothesDao clothesDao;

    @Override
    public Clothes getClothesByMessage(String clothesId, String clothesName, String clothesPrice) {
        return clothesDao.getClothesByMessage(clothesId,clothesName,clothesPrice);
    }

    @Override
    public List<Clothes> getAllClothes(String clothesType,String clothesName, int pageStart, int pageSize) {
        return clothesDao.getAllClothes(clothesType,clothesName,pageStart,pageSize);
    }

    @Override
    public int getClothesCounts(String clothesName) {
        return clothesDao.getClothesCounts(clothesName);
    }

    @Override
    public int addClothes(Clothes clothes) {
        return clothesDao.addClothes(clothes);
    }

    @Override
    public int deleteClothes(int clothesId) {
        return clothesDao.deleteClothes(clothesId);
    }

    @Override
    public int updateClothes(Clothes clothes) {
        return clothesDao.updateClothes(clothes);
    }

    @Override
    public Clothes getByName(String clothesName) {
        return clothesDao.getByName(clothesName);
    }

    @Override
    public int sub(int clothesId) {
        return clothesDao.sub(clothesId);
    }
}
